##########################################################################################################################
# Cross validate to produce results for training logistic regression model for the final submission
# You could predict with one epoch of one model with 4 folds simultaneously by using 4 gpus and runing in the background
##########################################################################################################################

# v9_without_test
## predict for epoch 120
for fold in {0..3}
do
  python vgg13_v9_predict.py -i 0 -w "../../data/tmp_classification_branch2/v9_without_test/fold_${fold}/epoch_120" -o "../../data/tmp_classification_branch2/result(baseline)/v9_without_test_120" -d "../../data/tmp_classification_branch1/data/lidc_kaggle_candidates_v9.hdf5" -p "../../data/tmp_classification_branch1/data/3dcnn_candidates_list_v9_4fold_newfold_newlabel.pkl" -t 0 -f $fold -g 0
done

# v9_test
## predict for epoch 120
for fold in {0..3}
do
  python vgg13_v9_predict.py -i 1 -w "../../data/tmp_classification_branch2/v9_test/fold_${fold}/epoch_120" -o "../../data/tmp_classification_branch2/result(baseline)/v9_test_120" -d "../../data/tmp_classification_branch1/data/lidc_kaggle_candidates_v9.hdf5" -p "../../data/tmp_classification_branch1/data/3dcnn_candidates_list_v9_4fold_newfold_newlabel.pkl" -t 1 -f $fold -g 0
done

# v15_without_test
## predict epoch for 90, 97, 99
for epoch in {90,97,99}
do
  for fold in {0..3}
  do
    python vgg13_v15_predict.py -i 0 -w "../../data/tmp_classification_branch2/v15_without_test/fold_${fold}/epoch_${epoch}" -o "../../data/tmp_classification_branch2/result(baseline)/v15_without_test_${epoch}" -d "../../data/tmp_classification_branch1/data/lidc_kaggle_candidates_v15.hdf5" -p "../../data/tmp_classification_branch1/data/3dcnn_cddv15_v2_4fold_alldata.pkl" -t 0 -f $fold -g 0
  done
done

# v15_test
## predict for epoch 90, 100
for epoch in {90,100}
do
  for fold in {0..3}
  do
    python vgg13_v15_predict.py -i 1 -w "../../data/tmp_classification_branch2/v15_test/fold_${fold}/epoch_${epoch}" -o "../../data/tmp_classification_branch2/result(baseline)/v15_test_${epoch}" -d "../../data/tmp_classification_branch1/data/lidc_kaggle_candidates_v15.hdf5" -p "../../data/tmp_classification_branch1/data/3dcnn_cddv15_v2_4fold_alldata.pkl" -t 0 -f $fold -g 0
  done
done
